﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ODS.Model
{
    public class DeviceModel
    {
        String vehicleName;

        public String VehicleName
        {
            get { return vehicleName; }
            set { vehicleName = value; }
        }

        String remainingRequestNumber;

        public String RemainingRequestNumber
        {
            get { return remainingRequestNumber; }
            set { remainingRequestNumber = value; }
        }

        String unreadNumber;

        public String UnreadNumber
        {
            get { return unreadNumber; }
            set { unreadNumber = value; }
        }

        String deviceIMEI;

        public String DeviceIMEI
        {
            get { return deviceIMEI; }
            set { deviceIMEI = value; }
        }

        String devicePhoneNumber;

        public String DevicePhoneNumber
        {
            get { return devicePhoneNumber; }
            set { devicePhoneNumber = value; }
        }

        String deviceSubscriptionCode;

        public String DeviceSubscriptionCode
        {
            get { return deviceSubscriptionCode; }
            set { deviceSubscriptionCode = value; }
        }

        String titleRequest;

        public String TitleRequest
        {
            get { return titleRequest; }
            set { titleRequest = value; }
        }

        DateTime expiresAt;

        public DateTime ExpiresAt
        {
            get { return expiresAt; }
            set { expiresAt = value;
                int compare = DateTime.Now.CompareTo(ExpiresAt);

                if (compare < 0)
                {
                    IsActivatedSubscription = true;
                }
                else
                {
                    IsActivatedSubscription = false;
                }
            }
        }

        DateTime lastAt;

        public DateTime LastAt
        {
            get { return lastAt; }
            set { lastAt = value; }
        }

        MessageModel lastMessage;

        public MessageModel LastMessage
        {
            get { return lastMessage; }
            set { lastMessage = value; }
        }

        List<EventDetailModel> listAllEvents;

        public List<EventDetailModel> ListAllEvents
        {
            get { return listAllEvents; }
            set { listAllEvents = value; }
        }

        List<EventDetailModel> listUnreadEvents;

        public List<EventDetailModel> ListUnreadEvents
        {
            get { return listUnreadEvents; }
            set { listUnreadEvents = value; }
        }

        bool isStarterOn;

        public bool IsStarterOn
        {
            get { return isStarterOn; }
            set { isStarterOn = value; }
        }

        bool isActivatedSubscription;

        public bool IsActivatedSubscription
        {
            get { return isActivatedSubscription; }
            set { isActivatedSubscription = value; }
        }
    }
}
